<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <g:set var="entityName" value="${message(code: 'estate.label', default: 'Estate')}" />
    <title>房地产类押品详情</title>
    <asset:stylesheet src="intelligence/swiper.css"/>
    <style>
    .contact-stat{
        padding: 8px 0px;
        text-align: center;
    }
    .contact-stat span{
        font-size: 13px;
        color: #88898c;
        margin-bottom: 10px;
    }
    .contact-stat strong{
        font-size: 13px;
        word-wrap: break-word;
    }
    .nav-tabs{
        border-bottom: none;
    }
    .hpanel > .panel-footer, .hpanel > .panel-section{
        background: #f9f9f9;
    }
    .flex{
        display: flex;justify-content: center;align-items: center;
    }
    .newFontSize{
        font-size: 12px;
    }
    table>tbody>tr>td, table>tbody>tr>th,.table>tfoot>tr>td, table>tfoot>tr>th, table>thead>tr>td, table>thead>tr>th{
        padding: 8px;
        line-height: 1.42857143;
        white-space: nowrap;
    }
    /*轮播图样式*/
    .swiper-container{
        width: 100%;
        height: 300px;
        margin-top: 10px;
    }
    .swiper-pagination-bullet-active{
        opacity: 0.6;
        background: #fff;
    }
    @media (max-width:1654px){
        #screenPage,#screenPage_1{
            height:162px;
        }
    }
    @media (max-width:1382px){
        #screenPage_2{
            height:477px;
        }
    }
    </style>
</head>
<body class="fixed-navbar fixed-sidebar">

<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-left">
                <ol class="hbreadcrumb breadcrumb">
                    <li>
                        <span>CINDATA PLS</span>
                    </li>
                    <li>
                        <g:link action="index"><span>房地产</span></g:link>
                    </li>
                    <li class="active">
                        <span>房地产详情</span>
                    </li>
                </ol>
            </div>
        </div>
    </div>
</div>

<div class="content animate-panel">
    %{--押品信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                押品信息
            </div>

            <div class="panel-body">
                <div class="col-md-12 text-center">
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs text-center">
                            <small style="font-size: 16px;">评估总价 :</small>
                            <span class="totalPrice">${estateDetail?.totalPrice?estateDetail?.totalPrice/10000:'-'}</span>
                            <small class="newFontSize">万元</small>
                        </h3>
                    </div>
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs">
                            <small style="font-size: 16px;">评估单价 : </small>
                            <span class="unitPrice">${estateDetail?.unitPrice}</span>
                            %{--${estateDetail?.valuationDate?estateDetail?.valuationDate?.toString().substring(0,10):'-'}--}%
                            <small class="newFontSize">元/平方米</small>
                        </h3>
                        <p><i class="pe-7s-clock" style="font-weight: bold; position: relative;top: 1px;"></i><small> 评估时间 ${estateDetail?.valuationDate}</small></p>
                    </div>
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs">
                            <small style="font-size: 16px;">抵质押率 : </small>
                            %{--${estateDetail?.cltv?estateDetail?.cltv*100:0}%--}%
                            <g:formatNumber number="${estateDetail?.ltv?estateDetail?.ltv*100:0}" type="number" minFractionDigits="2" maxFractionDigits="2" />%
                            <small class="newFontSize"></small>
                        </h3>
                    </div>
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs text-center">
                            <small style="font-size: 16px;">押品风险 : </small>
                            <g:if test="${estateDetail?.cltv>=0&&estateDetail?.cltv<=0.6}"><span style="color: #62CB31">低</span></g:if>
                            <g:if test="${estateDetail?.cltv>0.6&&estateDetail?.cltv<=0.8}"><span style="color: #FF9800">中</span></g:if>
                            <g:if test="${estateDetail?.cltv>0.8&&estateDetail?.cltv<=1}"><span style="color: #E51C23">高</span></g:if>
                            <g:if test="${estateDetail?.cltv>1}"><span style="color: #8B1818">损失</span></g:if></h4>
                        </h3>
                    </div>
                </div>
            </div>

            <div class="panel-footer contact-footer">
                <div class="row">
                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>押品编号</span>
                            <strong>${estateDetail?.externalId}</strong>
                        </div>
                    </div>
                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>房屋用途</span>
                            <strong>${estateDetail?.buildingType?.name}</strong>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="contact-stat">
                            <span>房屋详细地址</span>
                            <strong>${estateDetail?.sourceAddress}</strong>
                        </div>
                    </div>

                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>押品状态</span>
                            <strong>${estateDetail?.estateStatus?.name}</strong>
                        </div>
                    </div>


                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>城市/行政区</span>
                            <strong>${estateDetail?.city?.name}/${estateDetail?.district?.name}</strong>
                        </div>
                    </div>

                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>小区名称</span>
                            <strong>${community?.communityName}</strong>
                        </div>
                    </div>


                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>楼(幢)号</span>
                            <strong>${estateDetail?.buildingName}</strong>
                        </div>
                    </div>

                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>单元号</span>
                            <strong>${estateDetail?.unitName}</strong>
                        </div>
                    </div>

                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>所在层/总楼层</span>
                            <strong>${estateDetail?.sourceCurrentFloor?estateDetail?.sourceCurrentFloor:'-'}/${estateDetail?.sourceTotalFloor?estateDetail?.sourceTotalFloor:'-'}</strong>
                        </div>
                    </div>

                    <div class="col-md-1">
                        <div class="contact-stat">
                            <span>建筑面积</span>
                            <strong>${estateDetail?.buildArea}㎡</strong>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    %{--小区信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                小区信息
            </div>

            <div class="panel-body no-padding" style="overflow-x: auto;">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>小区名称</th>
                        <th>小区地址</th>
                        <th>建筑形式</th>
                        <th>建筑结构</th>
                        <th>建成年份</th>
                        <th>容积率</th>
                        <th>占地面积</th>
                        <th>建筑面积</th>
                        <th>总楼栋数</th>
                        <th>总户数</th>
                        <th>物业公司</th>
                        <th>物业费</th>
                        <th>开发商</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>${community?.communityName}</td>
                        <td>${community?.address}</td>
                        <td>${community?.buildingType?community?.buildingType:'-'}</td>
                        <td>${community?.buildingstructureName?community?.buildingstructureName:'-'}</td>
                        <td>${community?.buildYear?community?.buildYear + ' 年':'-'}</td>
                        <td>${community?.plotratio?community?.plotratio:'-'}</td>
                        <td>${community?.coveringArea?community?.coveringArea + ' 平方米':'-'}</td>
                        <td>${community?.buildArea?community?.buildArea + ' 平方米':'-'}</td>
                        <td>${community?.totalBuildingCount?community?.totalBuildingCount + ' 栋':'-'}</td>
                        <td>${community?.totalHouseHoldCount?community?.totalHouseHoldCount + ' 户':'-'}</td>
                        <td>${community?.propertyManagementCompany?community?.propertyManagementCompany:'-'}</td>
                        <td>${community?.pmfee?community?.pmfee + ' 元/(月·平方米)':'-'}</td>
                        <td>${community?.developer?community?.developer:'-'}</td>

                        <td>
                            <h5>
                                <g:if test="${estateDetail?.cltv>=0&&estateDetail?.cltv<=0.6}">
                                    <a href="javascript:void(0);" data-city = "${estateDetail.city.zoneNumber}" data-cid = "${estateDetail.communityId}" class="tiaozhuan btn btn-xs btn-outline btn-success">
                                        小区评级
                                    </a>
                                </g:if>
                                <g:if test="${estateDetail?.cltv>0.6&&estateDetail?.cltv<=0.8}">
                                    <a href="javascript:void(0);" data-city = "${estateDetail.city.zoneNumber}" data-cid = "${estateDetail.communityId}" class="tiaozhuan btn btn-xs btn-outline btn-warning">
                                        小区评级
                                    </a>
                                </g:if>
                                <g:if test="${estateDetail?.cltv>0.8&&estateDetail?.cltv<=1}">
                                    <a href="javascript:void(0);" data-city = "${estateDetail.city.zoneNumber}" data-cid = "${estateDetail.communityId}" class="tiaozhuan btn btn-xs btn-outline btn-danger">
                                        小区评级
                                    </a>
                                </g:if>
                                <g:if test="${estateDetail?.cltv>1}">
                                    <a href="javascript:void(0);" data-city = "${estateDetail.city.zoneNumber}" data-cid = "${estateDetail.communityId}" class="tiaozhuan btn btn-xs btn-outline btn-danger2">
                                        小区评级
                                    </a>
                                </g:if>
                                <g:if test="${estateDetail?.cltv<0}">
                                    暂无
                                </g:if>
                            </h5>
                            <g:if test="${communityPicArr?.size()>0}">
                                <a href="/estate/communityPic?id=${estateDetail?.id}" class="btn btn-info btn-xs btn-outline">小区照片</a>
                            </g:if>
                            <g:else>
                                <a class="btn btn-info btn-xs btn-outline" disabled style="color: #fff;">小区照片</a>
                            </g:else>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    %{--相似案例--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                相似案例
            </div>

            <div class="panel-body">

                <ul class="nav nav-tabs">
                    <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">相似成交案例</a></li>
                    <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">相似挂牌案例</a></li>
                </ul>
                <div class="tab-content">
                    <div id="tab-1" class="tab-pane active">
                        <div class="panel-body" style="border:none;padding: 0;">
                            <div class="tab-pane fade in active">
                                <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center">
                                    <thead>
                                    <th class="col-sm-1 text-center">小区名称</th>
                                    <th class="col-sm-1 text-center">所在层</th>
                                    <th class="col-sm-1 text-center">总楼层</th>
                                    <th class="col-sm-1 text-center">朝向</th>
                                    <th class="col-sm-1 text-center">建筑面积（㎡）</th>
                                    <th class="col-sm-1 text-center">成交单价（元/㎡）</th>
                                    <th class="col-sm-1 text-center">成交总价（万元）</th>
                                    <th class="col-sm-1 text-center">成交日期</th>
                                    </thead>
                                    <tbody>
                                    <g:each in="${saleList}">
                                        <tr>
                                            <td class="text-center">${estateDetail?.communityName?estateDetail?.communityName:'-'}</td>
                                            <td class="text-center">${it?.currentfloor?it?.currentfloor:'-'}</td>
                                            <td class="text-center">${it?.totalfloor?it?.totalfloor:'-'}</td>
                                            <td class="text-center">${it?.aspect?it?.aspect:'-'}</td>
                                            <td class="text-center">${it?.buildingarea?it?.buildingarea:'-'}</td>
                                            <td class="text-center">${com.cindata.NumberUtil.GetFixedNumber(it?.sqmprice)}</td>
                                            <td class="text-center">${com.cindata.NumberUtil.GetFixedNumber((it?.totalprice/10000))}</td>
                                            <td class="text-center">${it?.contractDateStr}</td>
                                        </tr>
                                    </g:each>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div id="tab-2" class="tab-pane">
                        <div class="panel-body" style="border:none;padding: 0;">
                            <div class="tab-pane fade in">
                                <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center">
                                    <thead>
                                    <th class="col-sm-1 text-center">小区名称</th>
                                    <th class="col-sm-1 text-center">所在层</th>
                                    <th class="col-sm-1 text-center">总楼层</th>
                                    <th class="col-sm-1 text-center">朝向</th>
                                    <th class="col-sm-1 text-center">建筑面积（㎡）</th>
                                    <th class="col-sm-1 text-center">挂牌单价（元/㎡)</th>
                                    <th class="col-sm-1 text-center">挂牌总价（万元）</th>
                                    <th class="col-sm-1 text-center">挂牌日期</th>
                                    </thead>
                                    <tbody>
                                    <g:each in="${listings}">
                                        <tr>
                                            <td class="text-center">${estateDetail?.communityName?estateDetail?.communityName:'-'}</td>
                                            <td class="text-center">${it?.currentfloor?it?.currentfloor:'-'}</td>
                                            <td class="text-center">${it?.totalfloor?it?.totalfloor:'-'}</td>
                                            <td class="text-center">${it?.aspect?it?.aspect:'-'}</td>
                                            <td class="text-center">${it?.buildingarea?it?.buildingarea:'-'}</td>
                                            <td class="text-center">${com.cindata.NumberUtil.GetFixedNumber(it?.sqmprice)}</td>
                                            <td class="text-center">${com.cindata.NumberUtil.GetFixedNumber((it?.totalprice/10000))}</td>
                                            <td class="text-center">${it?.timeofListingStr}</td>
                                        </tr>
                                    </g:each>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    %{--押品信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                押品详细信息
            </div>

            <div class="panel-body no-padding" style="overflow-x:auto;">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>抵押物编号</th>
                        <th>抵押物类型</th>
                        <th>抵押物名称</th>
                        <th>房屋所有权证书号码</th>
                        <th>抵押人名称</th>
                        <th>抵押人证件类型</th>
                        <th>抵押人证件号码</th>
                        <th>抵押人贷款卡编号</th>
                        <th>其他共同所有人</th>
                        <th>所占份额</th>
                        <th>此抵押物是否当前申请所购资产</th>
                        <th>抵押权顺位</th>
                        <th>在先担保金额</th>
                        <th>物业管理公司名称</th>
                        <th>楼盘名称</th>
                        <th>房屋详细地址</th>
                        <th>所在省/市/县</th>
                        <th>所在街道（路）</th>
                        %{--<th>所在里弄（胡同、巷等）</th>--}%
                        <th>所在幢号</th>
                        <th>所在单元号</th>
                        <th>所在门牌号</th>
                        <th>使用现状</th>
                        <th>承租人</th>
                        <th>租赁起始日期</th>
                        <th>租赁到期日期</th>
                        <th>年租金（万元）</th>
                        <th>建筑面积</th>
                        <th>购买总价</th>
                        <th>购买单价（元/M2）</th>
                        <th>首付款</th>
                        <th>币种</th>
                        <th>房屋结构</th>
                        <th>房龄</th>
                        <th>有无土地使用权证书</th>
                        <th>土地使用权证书号码</th>
                        <th>变现能力</th>
                        <th>价值波动性</th>
                        <th>查封便利性</th>
                        <th>抵质押物与借款人相关性</th>
                        <th>法律有效性</th>
                        <th>初次评估价值</th>
                        <th>初次评估机构</th>
                        <th>最新评估价值</th>
                        <th>最新评估机构</th>
                        <th>最新评估日期</th>
                        <th>下次评估日期</th>
                        <th>是否已办理抵押登记</th>
                        <th>抵押登记机构</th>
                        <th>他项权利证书号码</th>
                        <th>实际抵质押率</th>
                        <th>抵质押率上限</th>
                        <th>抵质押物说明</th>
                        <th>查封情况</th>
                        <th>查封顺位</th>
                        <th>查封法院</th>
                        <th>查封时间</th>
                        <th>前手查封人</th>
                        <th>当前查封物执行情况</th>
                        <th>处置金额</th>
                        <th>登记人</th>
                        <th>登记机构</th>
                        <th>登记日期</th>
                        <th>更新日期</th>
                    </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>${estateDetail?.externalId}</td>
                            <td>${estateDetail?.buildingType?estateDetail?.buildingType.name:'-'}</td>
                            <td>${estateDetail?.name?estateDetail?.name:'-'}</td>
                            <td>${estateDetail?.ownershipNumber?estateDetail?.ownershipNumber:'-'}</td>
                            <td>${estateDetail?.fullName?estateDetail?.fullName:'-'}</td>
                            <td>${estateDetail?.identityType?estateDetail?.identityType.name:'-'}</td>
                            <td>${estateDetail?.idNumber?estateDetail?.idNumber:'-'}</td>
                            <td>${estateDetail?.loanCardNumber?estateDetail?.loanCardNumber:'-'}</td>
                            <td>${estateDetail?.commonOwnerFullName?estateDetail?.commonOwnerFullName:'-'}</td>
                            <td>${estateDetail?.sharePoint?estateDetail?.sharePoint:'-'}</td>
                            <td>${estateDetail?.isApplayPurchaseAsset?'是':'否'}</td>
                            <td>${estateDetail?.rightOfMortgage?estateDetail?.rightOfMortgage:'-'}</td>
                            <td>${estateDetail?.firstGuaranteedAmount?estateDetail?.firstGuaranteedAmount:'-'}</td>
                            <td>${community?.propertyManagementCompany?community?.propertyManagementCompany:'-'}</td>%{--物业管理公司名称--}%
                            <td>${estateDetail?.communityName?estateDetail?.communityName:'-'}</td>
                            <td>${estateDetail?.sourceAddress?estateDetail?.sourceAddress:'-'}</td>
                            <td>${estateDetail?.province?estateDetail?.province.name:'-'}</td>
                            <td>${estateDetail?.streetName?estateDetail?.streetName:'-'}</td>
                            %{--<td></td>所在里弄（胡同、巷等）--}%
                            <td>${estateDetail?.buildingName?estateDetail?.buildingName:'-'}</td>
                            <td>${estateDetail?.unitName?estateDetail?.unitName:'-'}</td>
                            <td>${estateDetail?.houseName?estateDetail?.houseName:'-'}</td>
                            <td>${estateDetail?.usage?estateDetail?.usage:'-'}</td>
                            <td>${estateDetail?.lessee?estateDetail?.lessee:'-'}</td>
                            <td>${estateDetail?.leaseStartDate?estateDetail?.leaseStartDate:'-'}</td>
                            <td>${estateDetail?.leaseEndDate?estateDetail?.leaseEndDate:'-'}</td>
                            <td>${estateDetail?.annualRents?estateDetail?.annualRents:'-'}</td>
                            <td>${estateDetail?.buildArea?estateDetail?.buildArea:'-'}</td>
                            <td>${estateDetail?.purchaseTotalPrice?estateDetail?.purchaseTotalPrice:'-'}</td>
                            <td>${estateDetail?.purchaseUnitPrice?estateDetail?.purchaseUnitPrice:'-'}</td>
                            <td>${estateDetail?.firstPayment?estateDetail?.firstPayment:'-'}</td>
                            <td>${estateDetail?.currency?estateDetail?.currency.name:'-'}</td>
                            <td>${community?.buildingstructureName?community?.buildingstructureName:'-'}</td>%{--房屋结构--}%
                            <td>${estateDetail?.age?estateDetail?.age:'-'}</td>
                            <td>${estateDetail?.landUsageCertificate?'是':'否'}</td>
                            <td>${estateDetail?.landUsageCertificateNo?estateDetail?.landUsageCertificateNo:'-'}</td>
                            <td>${estateDetail?.cashability?estateDetail?.cashability:'-'}</td>
                            <td>${estateDetail?.valueVolatility?estateDetail?.valueVolatility:'-'}</td>
                            <td>${estateDetail?.seizureOfConvenience?estateDetail?.seizureOfConvenience:'-'}</td>
                            <td>${estateDetail?.relationOfMortgagor?estateDetail?.relationOfMortgagor:'-'}</td>
                            <td>${estateDetail?.legalValidity?estateDetail?.legalValidity:'-'}</td>
                            <td>${estateDetail?.firstEvaluatePrice?estateDetail?.firstEvaluatePrice:'-'}</td>
                            <td>${estateDetail?.firstEvaluateAccount?estateDetail?.firstEvaluateAccount:'-'}</td>
                            <td>${estateDetail?.latestEvaluatePrice?estateDetail?.latestEvaluatePrice:'-'}</td>
                            <td>${estateDetail?.latestEvaluateAccount?estateDetail?.latestEvaluateAccount:'-'}</td>
                            <td>${estateDetail?.latestEvaluateDate?estateDetail?.latestEvaluateDate:'-'}</td>
                            <td>${estateDetail?.nextEvaluateDate?estateDetail?.nextEvaluateDate:'-'}</td>
                            <td>${estateDetail?.mortgageRegistration?'是':'否'}</td>
                            <td>${estateDetail?.mortgageRegistrationOrg?estateDetail?.mortgageRegistrationOrg:'-'}</td>
                            <td>${estateDetail?.hisWarrantNumber?estateDetail?.hisWarrantNumber:'-'}</td>
                            <td>${estateDetail?.actualMortgageRate?estateDetail?.actualMortgageRate:'-'}</td>
                            <td>${estateDetail?.mortgageRateUpperLimit?estateDetail?.mortgageRateUpperLimit:'-'}</td>
                            <td>${estateDetail?.description?estateDetail?.description:'-'}</td>
                            <td>${estateDetail?.sealUpSituation?estateDetail?.sealUpSituation:'-'}</td>
                            <td>${estateDetail?.sealUpRights?estateDetail?.sealUpRights:'-'}</td>
                            <td>${estateDetail?.sealUpAccount?estateDetail?.sealUpAccount:'-'}</td>
                            <td>${estateDetail?.sealUpDate?estateDetail?.sealUpDate:'-'}</td>
                            <td>${estateDetail?.forwardHand?estateDetail?.forwardHand:'-'}</td>
                            <td>${estateDetail?.situationOfCurrentSeal?estateDetail?.situationOfCurrentSeal:'-'}</td>
                            <td>${estateDetail?.disposalAmount?estateDetail?.disposalAmount:'-'}</td>
                            <td>${estateDetail?.registerFullName?estateDetail?.registerFullName:'-'}</td>
                            <td>${estateDetail?.registerAccount?estateDetail?.registerAccount:'-'}</td>
                            <td>${estateDetail?.registerDate?estateDetail?.registerDate:'-'}</td>
                            <td>${estateDetail?.registerUpdateDate?estateDetail?.registerUpdateDate:'-'}</td>
                        </tr>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
    %{--贷款信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                贷款信息
            </div>

            <div class="panel-body no-padding" style="overflow-x:auto;">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>贷款编号</th>
                        <th>贷款余额</th>
                        <th>贷款总额</th>
                        <th>成交总价</th>
                        <th>回收总本金</th>
                        <th>回收总利息</th>
                        <th>回收总罚息</th>
                        <th>抵押权人</th>
                        <th>担保机构</th>
                        <th>放款银行</th>
                        <th>抵押类型</th>
                        <th>贷款方式</th>
                        <th>贷款时评估总价</th>
                        <th>贷款时评估单价</th>
                        <th>贷款到期日</th>
                        <th>贷款放款日</th>
                        <th>已还期数</th>
                        <th>剩余还款总期数</th>
                        <th>是否首套房</th>
                        <th>抵押率</th>
                    </tr>
                    </thead>
                    <tbody>
                    <g:each in="${mortgageList}">
                    <tr>
                        <td ><g:link class="firstTd" style="color: #3498DB" controller="mortgage" action="show" id="${it?.id}">${it?.serialNumber?it?.serialNumber:'-'}</g:link></td>
                        <td>${it?.loansBalance?it?.loansBalance:'-'}元</td>
                        <td>${it?.loansAmount?it?.loansAmount:'-'}元</td>
                        <td>
                            <g:if test="${it?.loansEvaluateTotalPrice}">
                                ${com.cindata.NumberUtil.GetFixedNumber(it?.loansEvaluateTotalPrice/10000)}（万元）
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${it?.curRecycleTotalCapital?it?.curRecycleTotalCapital:'-'}元</td>
                        <td>${it?.curRecycleTotalInterest?it?.curRecycleTotalInterest:'-'}元</td>
                        <td>${it?.curRecycleTotalFine?it?.curRecycleTotalFine:'-'}元</td>
                        <td>${it?.mortgageeName?it?.mortgageeName:'-'}</td>
                        <td>${it?.guaranteeInstitution?it?.guaranteeInstitution.name:'-'}</td>
                        <td>${it?.loansBankName?it?.loansBankName:'-'}</td>
                        <td>${it?.mortgageType?it?.mortgageType.name:'-'}</td>
                        <td>${it?.mortgagePattern?it?.mortgagePattern.name:'-'}</td>
                        <td>${it?.loansEvaluateTotalPrice?it?.loansEvaluateTotalPrice:'-'}元</td>
                        <td>${it?.loansEvaluatePrice?it?.loansEvaluatePrice:'-'}元</td>
                        <td>
                            <g:if test="${it?.endDate}">
                                <g:formatDate date="${it?.endDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>
                            <g:if test="${it?.startDate}">
                                <g:formatDate date="${it?.startDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${it?.curHasPaymentTODuration?it?.curHasPaymentTODuration:'-'}月</td>
                        <td>${it?.remainTime?it?.remainTime:'-'}月</td>
                        <td>${it?.isFirstHouse?'是':'否'}</td>
                        <td>${it?.ltv?it?.ltv:'-'}%</td>
                    </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
</div>
<asset:javascript src="intelligence/swiper.js"/>
<script>
    //    $('#goBack').click(function(){
    //        window.history.back(-1);
    //    })
    var riskText=$('.risk').text();
    if(riskText=='低风险>>'){
        $('.risk').css('color','#62CB31');
    }else if(riskText=='中风险>>'){
        $('.risk').css('color','#FF9800');
    }
    else if(riskText=='高风险>>'){
        $('.risk').css('color','#E51C23');
    }else{
        $('.risk').css('color','#3498DB');
    }


</script>
<script>
    function show(id){
        var url = window.location.origin+"/mortgage/show?id="+id;
        window.open(url);
    }
    $(function(){
        //点击搜索数据复制给搜索框
        $(document).on('click', '.tiaozhuan', function () {
            var id = $(this).attr("data-cid");
            var city = $(this).attr("data-city");
            $.ajax({
                url: '/buildingsRated/hasScore',
                data: {
                    id : id
                },
                dataType: 'json',
                beforeSend: function () {
                    $('body').append('<div  id = "tanchu" style=" top:0px;left:0px;width: 100%;height: 100%;position: fixed;z-index: 99;background: gray; opacity: 0.4;"><img src="/assets/loading.gif" style="position: fixed;z-index: 99;left: 50%;top: 50%;"/></div>');
                },
                success: function (data) {
                    if(data.score.closingScore){
                        location.href= "/buildingsRated/circulationAssessment?id="+id+"&city="+city;
                    } else {
                        toastr.error('此小区没有流动性评分！');
                        $("#tanchu").remove();
                    }
                },
                error: function () {
                    toastr.error('网络故障！');
                    $("#tanchu").remove();
                }
            })

        })
    })

</script>
</body>
</html>
